Water Index · Automated Extraction (Non-Shadow)
AWEI_nsh – Automated Water Extraction Index (Non-Shadow)
AWEI_nsh (non-shadow) is an automated water extraction index optimized for scenes
where terrain or building shadows are limited, using a weighted combination of
Green, NIR, SWIR1 and SWIR2 to robustly separate water from dark surfaces.
1. Scientific Definition
The Automated Water Extraction Index – non-shadow (AWEI_nsh)
is designed to maximize separation between water and non-water pixels (especially
dark built-up surfaces) under conditions with minimal shadow contamination.
Formula (Feyisa et al., 2014)
AWEI_nsh = 4 × (Green − SWIR1) − (0.25 × NIR + 2.75 × SWIR2)
Green – Green band reflectance
NIR – Near InfraRed band
SWIR1 – Short-Wave InfraRed 1
SWIR2 – Short-Wave InfraRed 2
Interpretation (Typical)
AWEI_nsh Interpretation
< 0 Non-water: soil, urban, vegetation
> 0 Water pixels (high confidence)
A simple binary classification is often used: AWEI_nsh ≥ 0 → water, AWEI_nsh < 0 → non-water.
Main Applications
Water body extraction in non-mountainous areas
Urban water mapping (canals, rivers, ponds)
Large-area water monitoring with stable threshold
Complementary to NDWI / MNDWI in complex land-cover
2. Data & Bands
Sentinel-2 (Recommended)
Green: B3 (~560 nm)
NIR: B8 (~842 nm)
SWIR1: B11 (~1610 nm)
SWIR2: B12 (~2190 nm)
Landsat 8 / 9
Green: B3
NIR: B5
SWIR1: B6
SWIR2: B7
Best Practices
Use surface reflectance data (SR collections).
Mask clouds and cloud shadows when possible.
Use AWEI_nsh for scenes with little terrain/urban shadow.
Combine with AWEI_sh in mountainous/shadowed areas if needed.
Suggested Palette
[ "#2b2d42", "#264766", "#2c7da0", "#00b4d8", "#90e0ef", "#caf0f8" ]
3. Google Earth Engine Code – AWEI_nsh (Sentinel-2)
Copy GEE code
// AWEI_nsh (Automated Water Extraction Index - non-shadow) using Sentinel-2 SR
// Feyisa et al. (2014)
// AWEI_nsh = 4*(Green - SWIR1) - (0.25*NIR + 2.75*SWIR2)
var roi = geometry; // Draw AOI and rename to 'geometry'
Map.centerObject(roi, 11);
// 1. Load Sentinel-2 surface reflectance
var s2 = ee.ImageCollection("COPERNICUS/S2_SR")
.filterBounds(roi)
.filterDate("2023-01-01", "2023-12-31")
.filter(ee.Filter.lt("CLOUDY_PIXEL_PERCENTAGE", 20))
.select(["B3","B8","B11","B12"]); // Green, NIR, SWIR1, SWIR2
// 2. Median composite
var img = s2.median().clip(roi);
// 3. Compute AWEI_nsh
var awei_nsh = img.expression(
"4.0 * (G - S1) - (0.25 * N + 2.75 * S2)",
{
"G": img.select("B3"), // Green
"N": img.select("B8"), // NIR
"S1": img.select("B11"), // SWIR1
"S2": img.select("B12") // SWIR2
}
).rename("AWEI_nsh");
// 4. Visualization
var vis = {
min: -2000,
max: 2000,
palette: [
"#2b2d42",
"#264766",
"#2c7da0",
"#00b4d8",
"#90e0ef",
"#caf0f8"
]
};
Map.addLayer(awei_nsh, vis, "AWEI_nsh (Sentinel-2)");
// Optional: binary water mask (AWEI_nsh > 0)
var waterMask = awei_nsh.gt(0).selfMask();
Map.addLayer(waterMask, {palette:["#00b4d8"]}, "Water Mask (AWEI_nsh > 0)", false);
// 5. Export AWEI_nsh as GeoTIFF
Export.image.toDrive({
image: awei_nsh,
description: "AWEI_nsh_Export",
fileNamePrefix: "AWEI_nsh_S2",
region: roi,
scale: 20, // SWIR resolution
crs: "EPSG:4326",
maxPixels: 1e13
});
AWEI_nsh (Automated Water Extraction Index – non-shadow) · Start4IT Remote Sensing Index Library